import axios from "axios";

const service = axios.create({
    baseURL:'http://101.37.38.67:7001',
    timeout:5000
});

//设置响应拦截器
service.interceptors.response.use((response)=>{
    return response.data
},(error)=>{
    return Promise.reject(error)

})
 
//等同service.interceptors.response.use(response=>response.data,error=>Promise.reject(error))

export function get(url,params){
    return service.get(url,{
        params
    })
}